let age:number = 10
age = 15


let arr:number[] = [123,456,789]
// arr.find(item=>item.toExponential())
console.log(arr);


function add(a:number,b:number):number{
  return a + b
}

type studengt = {
  userName:string
  gender:string
  result:number
  tall:string
  study:(content:string)=>void
  hobby:(content:string)=>void
}

let student :studengt ={
  userName:'小明',
  gender:'男',
  result:80,
  tall:'180cm',
  study(content) {
    console.log('爱学习' + content);
    
  },
  hobby(content) {
    console.log('sleep' + content);
    
  },
 

}
  
student.study('good'),
student.hobby('up')

interface student  {
userName:string
age:number
gender:string
}

let s1 :student={
  userName:'nihao',
  age:18,
  gender:'nv'
}


interface s2 extends student {
  study:()=>void
}
let s3:s2 ={
  userName:'nihao',
  age:18,
  gender:'nv',
  study:()=>{

  }
}
